package theFirstProject.chat;

import day15.ServerThead;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public
class Service {
    public static
    void main(String[] args) throws IOException {
        ServerSocket client=new ServerSocket(9998);
        System.out.println("启动服务器");
        while (true){
            Socket socket=client.accept();
            System.out.println("有新的客户端连接");
            //线程
            new ServerThead(socket).start();
        }
    }
}
